*Replication file for Rikhil R. Bhavnani and Bethany Lacina, 2018, Nativism and Economic Integration across the Developing World, Cambridge University Press. Table 7 and Figure 6.

global controls urban01 male age educin3 educin5 educin7

*Table 7

*Model 1
reg govemploy treatment trtmntmig5 smigrant5 $controls i.year i.statein if age>17 & age<66, cl(statein)

*Model 2
areg govemploy trtmntmig5 smigrant5 $controls if age>17 & age<66, a(stateyr) cl(stateyr)

*Model 3
reg govemploy ctreatment ctrtmntmig5 smigrant5 $controls i.year i.statein if age>17 & age<66, cl(statein)

*Model 4
areg govemploy ctrtmntmig5 smigrant5 $controls  if age>17 & age<66, a(stateyr) cl(stateyr)

*****************
* Graph: Figure 6
*****************
 
*Places to store prediction results
capture drop number
gen number = _n - 1
capture drop mydy* 
capture drop myci1* 
capture drop myci2*
capture drop mylabel*
gen mydy=.
gen myci1=.
gen myci2=.
gen mylabel=""
gen mylabelpos=.

qui: areg govemploy ctrtmntmig5 smigrant5 $controls  if age>17 & age<66, a(stateyr) cl(stateyr)

forval i=0(1)6 {

lincom smigrant5+`i'*ctrtmntmig5

replace mydy=r(estimate)*100 if number==`i'

replace myci1=(r(estimate)+r(se)*invttail(r(df),0.95))*100 if number==`i'

replace myci2=(r(estimate)-r(se)*invttail(r(df),0.95))*100 if number==`i'

}

twoway (line mydy number  if number<7) ///
(line myci1 number if number<7, lp(dash) lc(gs10)) ///
(line myci2 number  if number<7, lp(dash) lc(gs10)) ///
, name(b, replace)  ///
ylab() ///
scheme(lean2) ///
aspectratio(0.75) ///
legend(off) ///
ytitle("Difference % employed by government" "migrants cf. non-migrants", size(large)) //////
xtitle("Years of Panchayati Raj") 
